package com.dzz.sjgl.jpa;

import com.dzz.sjgl.entity.WordInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.io.Serializable;

/**
 * @author KRIC
 */
public interface WordRepository extends JpaRepository<WordInfo, Integer>, JpaSpecificationExecutor<WordInfo>, Serializable {
    @Query(value = " from WordInfo w where w.word=:word")
    WordInfo getByWord(@Param("word") String word);
}
